package com.scs.application.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;

/**
 * <p>
 *
 * </p>
 */
@Data
@EntityClassAnnotation(remark = "用户、角色---菜单、按钮关联表")
@TableName("sys_authority")
public class Authority extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "目标ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String targetId;
    @EntityFieldAnnotation(
            text = "授权目标类型",
            length = "1",
            not_null = true,
            default_value = "U",
            comment = "U：用户；R：角色"
    )
    private String targetType;
    @EntityFieldAnnotation(
            text = "资源ID",
            length = "32",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String resourceId;
    @EntityFieldAnnotation(
            text = "资源类型｜M：菜单；B：按钮",
            length = "1",
            not_null = true,
            default_value = "M",
            comment = ""
    )
    private String resourceType;
    @EntityFieldAnnotation(
            text = "节点选中状态",
            length = "",
            not_null = true,
            default_value = "1",
            comment = "0：部分选中；1：完全选中"
    )
    private Boolean isCompleteChecked;
}
